package top.yokey.shopnc.model;

import top.yokey.base.base.BaseHttpClient;
import top.yokey.base.base.BaseHttpListener;

@SuppressWarnings("ALL")
public class MemberInvoiceModel {

    private final String ACT = "member_invoice";
    private static volatile MemberInvoiceModel instance;

    public static MemberInvoiceModel get() {
        if (instance == null) {
            synchronized (MemberInvoiceModel.class) {
                if (instance == null) {
                    instance = new MemberInvoiceModel();
                }
            }
        }
        return instance;
    }

    public void invoiceList(BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "invoice_list")
                .post(baseHttpListener);

    }

    public void invoiceContentList(BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "invoice_content_list")
                .post(baseHttpListener);

    }

    public void invoiceDel(String invId, BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "invoice_del")
                .add("inv_id", invId)
                .post(baseHttpListener);

    }

    public void invoiceAdd(String select, String title, String content, BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "invoice_add")
                .add("inv_title_select", select)
                .add("inv_title", title)
                .add("inv_content", content)
                .post(baseHttpListener);

    }

}
